* {
  margin: 0;
  padding: 0;
}

.container {
  width: 300px;
  height: 300px;

  display: grid;
  grid-template-rows: repeat(3, 1fr);
  grid-template-columns: repeat(3, 1fr);
}

.container div {
  background-color: silver;
  background-clip: content-box;
  padding: 5px;

}

.container  .red{
    background-color: red;
}